package com.uton.rfidcontroller.model.base;

/**
 * Created by 王家宝 on 2017/8/30.
 * Email:639586819@qq.com
 * Tel:18241150668
 */
public class BaseModel<E> {
    /**
     * currentServerTime : 1476250995094
     * data : {}
     * isEmpty : false
     * isSuccess : true
     * treatmentResult : {"code":1000,"message":"[服务器]运行正常"}
     */

    private long currentServerTime;
    private E data;
    private boolean isEmpty;
    private boolean isSuccess;//代表 接口层是否有问题 true：没问题 false：根据code判断 提示用户说明Msg
    private TreatmentResultBean treatmentResult;

    public long getCurrentServerTime() {
        return currentServerTime;
    }

    public void setCurrentServerTime(long currentServerTime) {
        this.currentServerTime = currentServerTime;
    }

    public E getData() {
        return data;
    }

    public void setData(E data) {
        this.data = data;
    }

    public boolean isIsEmpty() {
        return isEmpty;
    }

    public void setIsEmpty(boolean isEmpty) {
        this.isEmpty = isEmpty;
    }

    public boolean isIsSuccess() {
        return isSuccess;
    }

    public void setIsSuccess(boolean isSuccess) {
        this.isSuccess = isSuccess;
    }

    public TreatmentResultBean getTreatmentResult() {
        return treatmentResult;
    }

    public void setTreatmentResult(TreatmentResultBean treatmentResult) {
        this.treatmentResult = treatmentResult;
    }

    public static class TreatmentResultBean {
        /**
         * code : 1000
         * message : [服务器]运行正常
         */

        private int code;
        private String message;

        public int getCode() {
            return code;
        }

        public void setCode(int code) {
            this.code = code;
        }

        public String getMessage() {
            return message;
        }

        public void setMessage(String message) {
            this.message = message;
        }
    }
//
//    @SerializedName("retCode")
//    private String retCode;
//    @SerializedName("retMsg")
//    private String retMsg;
//    @SerializedName("data")
//    private E data;
//
//    public boolean isSuccess() {
//        return "0000".equals(retCode);
//    }
//
//    public String getRetCode() {
//        return retCode;
//    }
//
//    public void setRetCode(String retCode) {
//        this.retCode = retCode;
//    }
//
//    public String getRetMsg() {
//        return retMsg;
//    }
//
//    public void setRetMsg(String retMsg) {
//        this.retMsg = retMsg;
//    }
//
//    public E getData() {
//        return data;
//    }
//
//    public void setData(E data) {
//        this.data = data;
//    }


}
